System 7 Pack provides several commands which let you take advantage of AppleScript’s Open Scripting Architecture.
The AppleScript command lets you execute a script and get back the results. If you wish to use a language other than AppleScript, call SetComponent with the 4 character ID of the desired scripting language. The codes currently available are “ascr” for AppleScript®, “QKCL” for QuicKeys® 3.0, and “LAND” for UserLand Frontier™ 2.1. The command ListComponents can be used to obtain a list of all available components.
If you wish to make your 4D application scriptable by AppleScript, in addition to writing AppleEvent handlers you must also create an ‘aete’ resource. We don’t provide any tools for creating aete resources. You can create an aete resource with Apple’s AETE Editor Stack, available as part of the AppleScript developer’s package or with Resorcerer, a commercial resource editor available from Mathemæsthetics at (617) 738-8803.
The aete resource must be placed either in the 4D application or a compiled database merged with 4D runtime. AppleScript won’t recognize an aete resource in an uncompiled or un-merged database.
NOTE: The QuicKeys 3.0 scripting language isn’t compatible with 4D 3.0.5 so you must use the QuicKeys command to run sequences in that case. QuicKeys Script is fully compatible with 4D 2.2.3.